1. Field of the Invention
The present invention relates to a method and an apparatus for improving the quality of an image by enhancing the contrast of the image.
2. Description of the Related Art
Conventional methods for improving the quality of an image by enhancing the contrast of the image include a method called "gray-scale transformation". For example, an original image, the contrast of which is to be enhanced, can include gray-scale levels in the range of a1 to a2, and a display apparatus which will display the image has the allowable gray-scale levels in the range of k1 to k2. According to conventional methods, the gray-scale range of the image of a1 to a2 is widened to the allowable range of k1 to k2, so that the contrast of the image is enhanced. The transformation for enhancing the contrast is performed by using Expression (1) below: EQU g(i, j)={(k2-k1).(f(i, j)-a1)/(a2-a1)}+k1 (1)
where f(i, j) denotes the gray-scale level of a pixel positioned in the i-th row and the j-th column of the original image, and g(i, j) denotes the gray-scale level of a pixel positioned in the i-th row and the j-th column of the image with enhanced contrast.
FIG. 5 shows the variation of gray-scale levels of an image along one scanning line. In FIG. 5, the solid line indicates the variation of gray-scale levels of an original image along the scanning line, and the one-dot chain line indicates the variation of gray-scale levels of an image which is obtained by enhancing the contrast of the original image with Expression (1), along the scanning line. In this example, it is assumed that the allowable gray-scale levels of the employed display apparatus are in the range of 0 to 255 (i.e., 0 to 255 gray-scale levels). As shown in FIG. 5, in regions A and C, the contrast of the original image is properly enhanced. As a result, the details in gray-scale variation of the original image are made clearer in regions A and C, so that a viewer can easily perceive the gray-scale variation. However, as to regions B and D, it is difficult for the viewer to perceive the details in the gray-scale variation of the original image. In regions B and D, since the gray-scale levels of the image with enhanced contrast are saturated, the information related to the details in the gray-scale variation of the original image is lost. In regions B and D, the image with enhanced contrast appears white (in the region B) or black (in the region D). Accordingly, it is impossible to realize how the original image appears.